<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>弹性盒子</title>
    <style>
        .box{
            width: 500px;
            height: 400px;
            border: 1px solid red;
            
            display: flex;
            /* 默认水平主轴 */
            justify-content: start;
            /* 默认垂直交叉轴 */
            align-items: start;
            /* 改变主轴方向 */
            /* flex-direction: column; */

            /* 溢出项目元素换行显示 */
            flex-wrap: wrap;
        }

        .box div{
            width: 100px;
            height: 100px;
            border: 1px solid blue;
        }

        .box .box3{
            /* flex-grow: 1; */
            flex-shrink:0;
        }
        .box .box2{
            /* flex-grow: 1; */
            flex-shrink: 0;
 
        }

        .box .box1{
            /* flex-grow: 1; */
            flex-shrink: 0;
        }

        .box .box4{
            /* flex-grow: 1; */
            flex-shrink: 0;
        }

        .box .box5{
            /* flex-grow: 1; */
            flex-shrink: 0;
        }

        .box .box6{
            /* flex-grow: 1; */
            flex-shrink: 0;
        }
        
    </style>
</head>
<body>
    <div class="box">
         <div class="box1">元素一</div>
         <div class="box2">元素二</div>
         <div class="box3">元素三</div>
         <div class="box4">元素四</div>
         <div class="box5">元素五</div>
         <div class="box6">元素六</div>
    </div>
</body>
</html>